<?php
include("include/config.inc.php");

$i=0;
$tableArray = array();
$selecttable = "SELECT orderId,waiterName,tableId,startTime
                  FROM ordermaster
                  JOIN waiter ON waiter.waiterId = ordermaster.waiterId
                 WHERE orderId = ".$_REQUEST['orderId'];
$selecttableRes = mysql_query($selecttable);
while($tableRow = mysql_fetch_array($selecttableRes))
{
	$tableArray[$i]['orderId']     = $tableRow['orderId'];
	$tableArray[$i]['waiterName']  = $tableRow['waiterName'];
	$tableArray[$i]['tableId']     = $tableRow['tableId'];
	$tableArray[$i]['startTime']   = $tableRow['startTime'];
	$i++;
}
include("./bottom.php");
$smarty->assign("tableArray",$tableArray);
$smarty->display('billPrint.tpl');
?>